home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
QRZ! Ham Radio 6
/
QRZ Ham Radio Callsign Database - Volume 6.iso
/
mac
/
files
/
finland
/
ddlcpack.lzh
/
RAWHDLC.C
< prev
next >
Wrap
C/C++ Source or Header
|
1993-01-05
|
1KB
|
43 lines
/*
* Raw (==HDLC) encoding of packet datagrams on an interface which can
* do it. - mea@utu.fi OH1MQK 31-May-1992
*/
#include "global.h"
#include "mbuf.h"
#include "proc.h"
#include "iface.h"
#include "internet.h"
#include "ip.h"
#include "slhc.h"
#include "n8250.h"
#include "asy.h"
#include "pktdrvr.h"
#include "socket.h"
#include "devparam.h"
#include "rawhdlc.h"
#include "trace.h"
/* Send IP datagram to HDLC -- that is, send to device output routine.. */
int
hdlc_send(bp,ifp,gateway,tos)
struct mbuf *bp; /* Buffer to send */
struct iface *ifp; /* Pointer to interface control block */
int32 gateway; /* Ignored (HDLC is for point-to-point) */
int tos;
{
return (*ifp->output)(ifp,NULLCHAR,NULLCHAR,0,bp);
}
/* Send a packet to HDLC -- that is, send to RAW device output routine.. */
int
hdlc_output(ifp,dest,source,protocol,data)
struct iface *ifp; /* Pointer to interface control block */
char *dest; /* Dest addr (ignored; point-to-point) */
char *source; /* Source addr (ignored; point-to-point) */
int16 protocol; /* Protocol Type field */
struct mbuf *data; /* Actual data to be sent */
{
return (*ifp->raw)(ifp,data);
}